-
-
Notifications
You must be signed in to change notification settings - Fork 872
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to re-send account creation emails. #2585
base: develop
Are you sure you want to change the base?
Add ability to re-send account creation emails. #2585
Conversation
Submitting the "invite user" form a second time will now send a new email.
Co-authored-by: Étienne Beaulé <[email protected]>
For
This might cause some confusion if a user is invited once with some role, but the follow-up email is sent with a different role (as the second role will be ignored). However, I think this is more reasonable than changing the user's role here (this should be done separately if necessary)? |
@teymour-aldridge That is a good point! A user can have many groups, and different groups between tournaments, so that new user check is problematic. Have you tried using the I think it'd look something like this: user.membership_set.add(self.cleaned_data['role']) |
@@ -34,7 +34,8 @@ def get_users(self, email): | |||
'username': email.split("@")[0], | |||
}, | |||
) | |||
user.membership_set.create(group=self.cleaned_data['role']) | |||
if created: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the .add()
method call, do we need this check? It could cause problems if re-inviting a user, but with a new group (like CA + Equity or in another tournament)
Submitting the "invite user" form a second time will now send a new email.
Fixes #2582